package org.deng.learn.designpattern.singleton;

/**
 * @ Author: DengLibin
 * @ Description: 单利模式四 懒加载 线程安全 用内部类
 * @ DateTime:  21:57 2018/5/7 0007
 */
public class Singleton4 {
    private Singleton4(){}

    private static class Inner{
        private static Singleton4 instance = new Singleton4();
    }

    public static  Singleton4 getInstance(){
        return Inner.instance;
    }
}
